<template>
  <div>
    <submitPreview ref="submitPreview" :examinationPaperId="examinationPaperId" :paperData="paperData" :examination4Player="true" />
  </div>
</template>

<script>
  import submitPreview from '@/components/examination/submitPreview.vue'
  import {examination_all4player} from '@/api/person.js'
  export default {
    components: {
      submitPreview,
    },
    data() {
      return {
        examinationPaperId: 0,
        paperData: {}
      }
    },
    created() {
      this.examinationPaperId = this.getQueryVariable()
      this.getExaminationAll4player()
    },
    methods: {
      getExaminationAll4player() {
        examination_all4player({paperId:this.examinationPaperId}).then(res=>{
          if(res.code === 200) {
            this.paperData = res.data
          }
        })
      },
      getQueryVariable() {
        var query = window.location.href;
        var vars = query.split("?")[1];
        return vars.split('=')[1];
      }
    }
  }
</script>

<style scoped>

</style>
